A sinusoidal encoder outputs a pair of sinusoidal signals in quadrature phase relationship, with distance covered over one signal cycle of the encoder being referred to as one “line” of the encoder. The term “sinusoid” is used loosely in this context because some encoders, particularly less expensive encoders, output only rough approximations of sinusoids, or otherwise output sinusoids with significant harmonic components in addition to the fundamental frequency component.
A coarse physical position (“position”) may be tracked by a running count of the signal cycles over multiple lines of the encoder, and much finer incremental positions may be tracked within each signal cycle via “interpolation.” One technique for interpolating the position within each signal cycle relies on the arctangent function, which expresses the incremental or fine position within the current signal cycle as:
            ∅      fine        =                  tan                  -          1                    ⁡              (                              V            sin                                V            cos                          )              ,where Vsin and Vcos are the instantaneous signal values of the quadrature waveforms output by the encoder. So-called “encoder interpolators” exploit the foregoing angular relationship to provide high-resolution tracking of position within each recurring cycle of a sinusoidal encoder. Precision machining and many other motion-control applications require the higher resolutions that can be provided by good encoder interpolators.
However, errors in the encoder signals directly affect accuracy in position determination, and this point holds true whether the encoder encodes angular or linear positions of a physical system. Merely by way of example, the physical system may be a robotic arm, a machine tool head, or a workpiece holder.
Known approaches to compensation for imperfections—errors—in the encoder signals typically operate in the “encoder domain,” which is another way of saying that the corrections are detected and applied with respect to the output signals provided by the encoder in question. Consider, for example, the encoder interpolator detailed in U.S. Pat. No. 8,384,570, which patent is incorporated herein by reference and discloses techniques for compensating for fundamental errors in the encoder signals. Here, fundamental errors include any one or more of voltage offsets on the encoder signals, magnitude mismatches between the encoder signals, and phase error between the encoder signals. The '570 patent provides for such compensation by adjusting the numerical values sampled from the encoder signals.
Potentially significant errors in position detection arise because of harmonic components in the encoder signals. The encoder signals output from a sinusoidal encoder include a fundamental frequency component, which can be understood as the “desired” signal. Unfortunately, the encoder signals may also include undesirable harmonic components. Known encoder compensation techniques contemplate limited forms of harmonic compensation.
U.S. Pat. No. 7,109,900, for example, describes a technique for detecting and compensating the third harmonic component present in encoder signals. The disclosed approach operates in the encoder domain and relies on examining the Lissajous patterns resulting from converting the encoder signals—i.e., sine and cosine signals—into corresponding radius and angle values. Computational complexity limits the viability of the technique, and that complexity especially discourages extension of the technique to higher harmonic components of the fundamental frequency.